package com.doumuxie.mapper;

import com.doumuxie.dto.UserDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {


    @Select("<script>" +
            "select * from t_user " +
            "where 1=1 " +
            "<if test='username != null'>" +
            "and username = #{username} " +
            "</if>" +
            "<if test='deleteState != null'>" +
            "and delete_state = #{deleteState} " +
            "</if>" +
            "limit 1" +
            "</script>")
    UserDto selectByExample(UserDto dto);
}
